home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 24
/
Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso
/
Aminet
/
comm
/
net
/
XdccGet.lha
/
XdccGet.amirx
< prev
next >
Wrap
Text File
|
1998-01-07
|
6KB
|
204 lines
/* $VER: XdccGet.AMIRX 3.01 (7.1.98) Button XDCC Requestor Clean Version
*/
/* Welcome to XDCC Get, What is it? Well with the new feature of Amirc 1.53
Button room is no longer a problem, So make use of the button features.
XDCC Get makes it easier to request files for someones XDCC list no more
typing the long XDCC command just select the user, click a button,
select or enter a number, and the request is sent......
This script is Mail-ware, if you use it EMail me and tell me what you
think for improvements, etc...
For v2.1 and previous:
IRC Bossman^ Email: bosman@erols.com Web:www.erols.com/bosman
More of my Amirc scripts can be found on my Homepage.
For v3.0 and onwards:
IRC lanky Email: sykoe@sub.net.au
I thank Bossman^ again for him letting me to expand XdccGet further.
v3.01 Added: /Msg Xdcc Support for Other Xdcc platforms.
Cleaned Up Code.
More And Better Key ShortCuts.
Warning Of No RexxReqTools/Nick Given Now Works.
(Warning doesn't work as a button due to AmIRC)
Clean Output (Hidden /CTCP & /Msg version)
Better Presented Generally.
Setup: Make sure RexxReqTools.library is in your LIBS: assign.
If you do not have this get the newest version from Aminet:
util/libs/ReqToolsUsr.lha
Make a button in AmIRC: Settings-Setup-Actions
select a empty button position and enter XdccGet
then /Rx XdccGet.amirx %u then save
Move XdccGet.amirx to the Amirc/Rexx dir
If you wish; make an alias in AmIRC: Settings-Lists-Alias
XdccGet /Rx XdccGet.amirx
Usage: /Rx XdccGet.amirx {nick}
*/
/*----------------------------Program Starts Below-------------------------*/
options results
"INFO screen"
pubs='"'result'"'
IF ~Show(L,'rexxreqtools.library') THEN DO
IF ~AddLib('rexxreqtools.library',0,-30,0) THEN DO
'Echo Unable To Open RexxReqTools.library'
sEcho('Unable To Open RexxReqTools.library')
Exit
End
End
NL = '0a'x
CTCP = '01'x
BOLD = '02'x
OPTIONS RESULTS
PARSE ARG nick
IF nick='' THEN DO
sEcho('Choose a Nick to use XDCC Get on.')
Exit
End
Start()
Exit
Start:
call rtezrequest( "Welcome to XDCC Get CTCP Window, You're requesting information from `" ||nick||"'" || NL ||,
"O - Requests a list and opens the pack GUI" || NL ||,
"L - Requests a list and Quits" || NL ||,
"P - Goes to pack request menu" || NL ||,
"M - Goes to XDCC Get msg menu",,
"List&_Open GUI|_List&Quit|_Pack|_Msg|_About|_Cancel" , 'XDCC Get CTCP Menu', ' rt_pubscrname='pubs 'rt_reqpos = reqpos_centerscr')
IF rtresult == 0 THEN DO
sEcho('XDCC GUI Cancelled.')
Exit
End
IF rtresult == 1 THEN DO
/* 'Say /CTCP' nick 'XDCC List' */
"RAW PRIVMSG "nick" :"CTCP"XDCC List"CTCP
sEcho(BOLD'CTCP XDCC List sent to 'nick'.'BOLD)
SendType="C"
Get()
Exit
End
IF rtresult == 2 THEN DO
/* 'Say /CTCP' nick 'XDCC List' */
"RAW PRIVMSG "nick" :"CTCP"XDCC List"CTCP
sEcho(BOLD'CTCP XDCC List sent to 'nick'.'BOLD)
Exit
End
IF rtresult == 3 THEN DO
SendType="C"
Get()
Exit
End
IF rtresult == 4 THEN DO
SendType="M"
Msg()
Exit
End
IF rtresult == 5 THEN
About()
Start()
Exit
End
Msg:
call rtezrequest( "Welcome to XDCC Get Msg Window, You're requesting information from `" ||nick||"'" || NL ||,
"O - Requests a list and opens the pack GUI" || NL ||,
"L - Requests a list and Quits" || NL ||,
"P - Goes to pack request menu" || NL ||,
"C - Goes back to the XDCC Get CTCP menu",,
"List&_Open GUI|_List&Quit|_Pack|_CTCP|_About|_Cancel" , 'XDCC Get Msg Menu', ' rt_pubscrname='pubs 'rt_reqpos = reqpos_centerscr')
IF rtresult == 0 THEN DO
sEcho('XDCC GUI Cancelled.')
Exit
End
IF rtresult == 1 THEN DO
/* 'Say /Msg' nick 'XDCC List' */
"RAW PRIVMSG "nick" :XDCC List"
sEcho(BOLD'Msg XDCC List sent to 'nick'.'BOLD)
Get()
Exit
End
IF rtresult == 2 THEN DO
"RAW PRIVMSG "nick" :XDCC List"
sEcho(BOLD'Msg XDCC List sent to 'nick'.'BOLD)
Exit
End
IF rtresult == 3 THEN DO
Get()
Exit
End
IF rtresult == 4 THEN DO
Start()
Exit
End
IF rtresult == 5 THEN
About()
Msg()
Exit
End
Get:
call rtezrequest( "Pick the XDCC pack number to request from `" ||nick||"'" || NL ||,
"Select Input to request a higher number " || NL ||,
"Pressing Return will choose manual input.",,
"_1|_2|_3|_4|_5|_6|_7|_8|_9|1_0|11|12|13|15|_Input", 'Pack Request Window', 'rtez_defaultresponse = 0 rt_pubscrname='pubs 'rt_reqpos = reqpos_centerscr')
xdccnum = rtresult
IF rtresult = 0 THEN DO
xdccnum = rtgetlong(, , "Enter XDCC pack # to get from `" ||nick|| "':" , ,'rt_pubscrname='pubs 'rt_reqpos = reqpos_centerscr')
IF rtresult == 0 THEN DO
sEcho('XDCC GUI Cancelled.')
Exit
End
End
IF SendType = "C" THEN DO
/* 'Say /CTCP' nick 'XDCC Send #'xdccnum */
"RAW PRIVMSG "nick" :"CTCP"XDCC Send #"xdccnum CTCP
sEcho(BOLD'CTCP XDCC Send request for pack #'xdccnum' to 'nick' sent.'BOLD)
End
ELSE DO
/* 'Say /Msg' nick 'XDCC Send #'xdccnum */
"RAW PRIVMSG "nick" :XDCC Send #"xdccnum
sEcho(BOLD'Msg XDCC Send request for pack #'xdccnum' to 'nick' sent.'BOLD)
End
Exit
End
About:
call rtezrequest( "Welcome to XDCC Get. Any comments ideals email me(lanky):" || NL ||,
"sykoe@sub.net.au I would like to know what you think.", "OK", , ' rt_pubscrname='pubs 'rt_reqpos = reqpos_centerscr')
Return(0)
sEcho:
IF arg(1)~='' then 'ECHO P='d2c(27)'b«XDCC-Get» 'arg(1)
Return(0)